package com.ruoyi.project.service.impl;

import java.util.List;

import com.ruoyi.common.datascope.annotation.DataScope;
import com.ruoyi.project.domain.CxcyExpense;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.CxcyExpenseMapper;
import com.ruoyi.project.service.ICxcyExpenseService;

/**
 * 费用信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-10
 */
@Service
public class CxcyExpenseServiceImpl implements ICxcyExpenseService 
{
    @Autowired
    private CxcyExpenseMapper cxcyExpenseMapper;

    /**
     * 查询费用信息
     * 
     * @param id 费用信息主键
     * @return 费用信息
     */
    @Override
    public CxcyExpense selectCxcyExpenseById(Long id)
    {
        return cxcyExpenseMapper.selectCxcyExpenseById(id);
    }

    /**
     * 查询费用信息列表
     * 
     * @param cxcyExpense 费用信息
     * @return 费用信息
     */
    @Override
    @DataScope(deptAlias = "cxcy_expense", userAlias = "cxcy_expense")
    public List<CxcyExpense> selectCxcyExpenseList(CxcyExpense cxcyExpense)
    {
        return cxcyExpenseMapper.selectCxcyExpenseList(cxcyExpense);
    }

    /**
     * 新增费用信息
     * 
     * @param cxcyExpense 费用信息
     * @return 结果
     */
    @Override
    public int insertCxcyExpense(CxcyExpense cxcyExpense)
    {
        return cxcyExpenseMapper.insertCxcyExpense(cxcyExpense);
    }

    /**
     * 修改费用信息
     * 
     * @param cxcyExpense 费用信息
     * @return 结果
     */
    @Override
    public int updateCxcyExpense(CxcyExpense cxcyExpense)
    {
        return cxcyExpenseMapper.updateCxcyExpense(cxcyExpense);
    }

    /**
     * 批量删除费用信息
     * 
     * @param ids 需要删除的费用信息主键
     * @return 结果
     */
    @Override
    public int deleteCxcyExpenseByIds(Long[] ids)
    {
        return cxcyExpenseMapper.deleteCxcyExpenseByIds(ids);
    }

    /**
     * 删除费用信息信息
     * 
     * @param id 费用信息主键
     * @return 结果
     */
    @Override
    public int deleteCxcyExpenseById(Long id)
    {
        return cxcyExpenseMapper.deleteCxcyExpenseById(id);
    }
}
